package com.homework12;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class demo {
    public static void main(String[] args) throws IOException {
        Path path = Paths.get("D:\\h.txt");
        Files.copy(path,new FileOutputStream("D:\\h1.txt"));
    }
}
